﻿using Softserve.Pottery.Manufacturing.Domains;
using Softserve.Pottery.Ordering.Domains;
using Softserve.Pottery.Store.Domains;
using Softserve.Pottery.Warehouse.Domains;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Softserve.Pottery.Infrastructure;

namespace Pottery.Frontend.Controllers
{
    public static class Mocks
    {
        public static List<User> users = new List<User>()
            {
                new User(){Id = 1, FirstName = "Ivan", LastName = "Ivanov", MiddleName = "Ivanovich", DateCreate = DateTime.Now, Email = "blabla1@mail.com", CumulativeSum = 0,
                Group = UserGroup.Customer, PartnerCardNumber = String.Empty, PhoneNumber = "555-123456", Status = 1},
                new User(){Id = 2, FirstName = "Petr", LastName = "Petrov", MiddleName = "Sergeevich", DateCreate = DateTime.Now, Email = "blabla2@mail.com", CumulativeSum = 0,
                Group = UserGroup.Customer, PartnerCardNumber = String.Empty, PhoneNumber = "555-123456", Status = 1},
                new User(){Id = 1, FirstName = "Sergei", LastName = "Sidorov", MiddleName = "Petrovich", DateCreate = DateTime.Now, Email = "blabla3@mail.com", CumulativeSum = 0,
                Group = UserGroup.Customer, PartnerCardNumber = String.Empty, PhoneNumber = "555-123456", Status = 1},
                new User(){Id = 1, FirstName = "Bobrov", LastName = "Aleksandr", MiddleName = "Sergeevich", DateCreate = DateTime.Now, Email = "blabla4@mail.com", CumulativeSum = 0,
                Group = UserGroup.Customer, PartnerCardNumber = String.Empty, PhoneNumber = "555-123456", Status = 1}
            };


        public static IEnumerable<Catalog> catalogs = new List<Catalog>()
            {
                new Catalog{Id = 1, Name = "Горшочки"},
                new Catalog{Id = 2, Name = "Чашки, бокалы"},
                new Catalog{Id = 3, Name = "Салфетницы"},
                new Catalog{Id = 4, Name = "Турки, чайники"},
                new Catalog{Id = 5, Name = "Вазы"},
                new Catalog{Id = 6, Name = "Кувшины"}
            };

        public static List<Order> orders = new List<Order>()
            {
                new Order(){Id = 1, ItemIdCollection = new List<int>(){1 , 2, 3}, BatchesID = new List<int>() {1}, DateCreate = DateTime.Now, DeliveryAddressId = 3, DeliveryType = DeliveryType.Pickup,
                Priority = 1, UserId = 1, Status = OrderStatus.Approved},
                new Order(){Id = 2, ItemIdCollection = new List<int>(){1, 2, 3}, BatchesID = new List<int>() {1}, DateCreate = DateTime.Now, DeliveryAddressId = 4, DeliveryType = DeliveryType.Pickup,
                Priority = 1, UserId = 2, Status = OrderStatus.Approved}
            };

        public static List<Address> addresses = new List<Address>()
            {
                new Address(){Id = 1, City = "Dnepr", ApartmentNumber = String.Empty, Country = "Ukraine", Description = String.Empty, Floor = 1, HouseNumber = "22",
                Region = "Dnepr obl.", Street = "Some str.", ZipCode = 49000},
                new Address(){Id = 2, City = "Dnepr", ApartmentNumber = String.Empty, Country = "Ukraine", Description = String.Empty, Floor = 1, HouseNumber = "22",
                Region = "Dnepr obl.", Street = "Another str.", ZipCode = 49000},
                new Address(){Id = 3, City = "Dnepr", ApartmentNumber = String.Empty, Country = "Ukraine", Description = String.Empty, Floor = 1, HouseNumber = "122",
                Region = "Dnepr obl.", Street = "Some str.", ZipCode = 49000},
                new Address(){Id = 4, City = "Dnepr", ApartmentNumber = String.Empty, Country = "Ukraine", Description = String.Empty, Floor = 1, HouseNumber = "222",
                Region = "Dnepr obl.", Street = "Another str.", ZipCode = 49000},

            };

        public static List<PotteryWarehouse> warehouses = new List<PotteryWarehouse>()
            {
                new PotteryWarehouse(){Id = 1, AddressId = 1, DateCreate = DateTime.Now, Name = "W1", SquareFree = 100500, SquareTotal = 100500},
                new PotteryWarehouse(){Id = 2, AddressId = 2, DateCreate = DateTime.Now, Name = "W2", SquareFree = 100500, SquareTotal = 100500}
            };

        public static IEnumerable<Product> products = new List<Product>()
            {
                new Product(){Id = 1, IsSimple = true, CatalogId = 1, CostPrice = 10, Price = 15, Description = "Декоративный кувшин деревенский для хранения молока", Design = "Design 1", IsActive = true, Name = "Кувшин ДД-1", Size = "10x10x10"},
                new Product(){Id = 2, IsSimple = true, CatalogId = 2, CostPrice = 20, Price = 25, Description = "Декоративный кувшин деревенский для хранения молока", Design = "Design 2", IsActive = true, Name = "Кувшин ДД-2", Size = "10x10x10"},
                new Product(){Id = 3, IsSimple = true, CatalogId = 1, CostPrice = 30, Price = 35, Description = "Декоративный кувшин деревенский для хранения молока", Design = "Design 3", IsActive = false, Name = "Кувшин ДД-3", Size = "10x10x10"},
                new Product(){Id = 4, IsSimple = true, CatalogId = 2, CostPrice = 10, Price = 15, Description = "Декоративный кувшин деревенский для хранения молока", Design = "Design 1", IsActive = true, Name = "Кувшин ДД-11", Size = "20x20x20"},
                new Product(){Id = 5, IsSimple = true, CatalogId = 3, CostPrice = 20, Price = 25, Description = "Декоративный кувшин деревенский для хранения молока", Design = "Design 2", IsActive = false, Name = "Кувшин ДД-22", Size = "20x20x20"},
                new Product(){Id = 6, IsSimple = true, CatalogId = 4, CostPrice = 30, Price = 35, Description = "Декоративный кувшин деревенский для хранения молока", Design = "Design 3", IsActive = true, Name = "Кувшин ДД-33", Size = "20x20x20"}
            };

        public static List<Batch> btaches = new List<Batch>()
            {
                new Batch(){Id = 1, DateCreate = DateTime.Now, ItemCollection = new List<int>(){1, 2 , 3}, MasterId = 3, Material = MaterialType.RedClay},
                new Batch(){Id = 2, DateCreate = DateTime.Now, ItemCollection = new List<int>(){1, 2 , 3}, MasterId = 3, Material = MaterialType.RedClay}
            };

        public static List<Notification> notifications = new List<Notification>()
            {
                new Notification(){Id = 1, Message = "Test message!", ReceiverId = 3, Type = NotificationType.pushMessage},
                new Notification(){Id = 2, Message = "Test message again!", ReceiverId = 3, Type = NotificationType.pushMessage}
            };

        public static List<Payment> payments = new List<Payment>()
            {
                new Payment(){Id = 1, OrderId = 1, Price = 100500, Type = PaymentType.CashPayment},
                new Payment(){Id = 2, OrderId = 2, Price = 100500, Type = PaymentType.CashPayment}
            };

        public static List<Team> teams = new List<Team>()
            {
                new Team(){Id = 1, DefectPercent = 0.1, MasterId = 3, Perfomance = 100}
            };

        public static List<Plan> plans = new List<Plan>()
            {
                new Plan(){TeamId = 1, BatchesId = new List<int>(){1, 2}, DateBegin = DateTime.Now}
            };

        public static List<Approvement> apps = new List<Approvement>()
            {
                new Approvement(){Id = 1, Approved = false, BatchId = 1, CurrentStage = ProductionStage.Started, MasterId = 3, ProductsId = new List<int>(){1, 2, 3}},
                new Approvement(){Id = 2, Approved = false, BatchId = 2, CurrentStage = ProductionStage.Started, MasterId = 3, ProductsId = new List<int>(){1, 2, 3}}
            };


        public static Product product = new Product() { Id = 2, IsSimple = true, CatalogId = 1, CostPrice = 20, Price = 25, Description = "Декоративный кувшин деревенский для хранения молока", Design = "Design 2", IsActive = true, Name = "Кувшин ДД-2", Size = "10x10x10" };
    }
}
